package com.heima.admin.controller.v1;

import com.heima.admin.service.ApUserRealnameService;
import com.heima.apis.userService.IUserServiceClinent;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.ApUserRealnameDto;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @创建人: stone
 * @描述:
 */
@RestController
@RequestMapping("/api/v1/auth")
@Slf4j
public class ApUserRealnameController {

    @Autowired
    private IUserServiceClinent iUserServiceClinent;

    @PostMapping("/list")
    @ApiOperation(value = "用户查询接口")
    public ResponseResult getUserRealnameList(@RequestBody ApUserRealnameDto dto) {
//        log.info("用户查询接口参数:"+dto);
        return iUserServiceClinent.getUserRealnameList(dto);
    }

    @PostMapping("/authFail")
    @ApiOperation(value = "用户审核失败接口")
    public ResponseResult authFail(@RequestBody ApUserRealnameDto dto) {
//        log.info("用户审核成功接口参数失败:"+dto);
        return iUserServiceClinent.authFail(dto);
    }

    @PostMapping("/authPass")
    @ApiOperation(value = "用户审核成功接口")
    public ResponseResult authPass(@RequestBody ApUserRealnameDto dto) {
//        log.info("用户审核成功接口参数:"+dto);
        return iUserServiceClinent.authPass(dto);
    }


}
